gboolean ret = FALSE;
OstreeBootloaderGrub2 *self = OSTREE_BOOTLOADER_GRUB2 (bootloader);
g_autoptr(GFile) efi_basedir = NULL;
- g_autoptr(GFileInfo) file_info = NULL;
if (g_file_query_exists (self->config_path_bios, NULL))
{
{
OstreeBootloaderGrub2 *self = OSTREE_BOOTLOADER_GRUB2 (bootloader);
gboolean ret = FALSE;
- g_autoptr(GFile) efi_new_config_temp = NULL;
- g_autoptr(GFile) efi_orig_config = NULL;
g_autoptr(GFile) new_config_path = NULL;
GSubprocessFlags subp_flags = 0;
glnx_unref_object GSubprocessLauncher *launcher = NULL;
{
gboolean ret = FALSE;
const guint8 nulchar = 0;
- g_autofree char *ret_contents = NULL;
g_autoptr(GMemoryOutputStream) buf = NULL;
g_autoptr(GMainContext) mainctx = NULL;
FetchUriSyncData data;
gboolean do_commit;
OstreeRepoMode repo_mode;
g_autofree char *temp_filename = NULL;
- g_autoptr(GFile) stored_path = NULL;
g_autofree guchar *ret_csum = NULL;
glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
g_autoptr(GInputStream) file_input = NULL;
{
gboolean ret = FALSE;
gboolean ret_transaction_resume = FALSE;
- g_autofree char *stagedir_name = NULL;
- glnx_fd_close int stagedir_fd = -1;
- g_auto(GLnxDirFdIterator) dfd_iter = { 0, };
g_return_val_if_fail (self->in_transaction == FALSE, FALSE);
gboolean ret = FALSE;
OstreeRepoCommitFilterResult filter_result;
OstreeRepoFile *repo_dir = NULL;
- g_autoptr(GFileEnumerator) dir_enum = NULL;
g_autoptr(GFileInfo) child_info = NULL;
if (dir)
const char *relpath,
GFileInfo **out_file_info)
{
- g_autofree char *hardlink = aic_get_final_entry_hardlink (ctx);
g_autoptr(GFileInfo) file_info = NULL;
g_autofree char *abspath = NULL;
const char *cb_path = NULL;
#ifdef HAVE_LIBARCHIVE
gboolean ret = FALSE;
struct archive *a = NULL;
- g_autoptr(GFileInfo) tmp_dir_info = NULL;
OstreeRepoImportArchiveOptions opts = { 0, };
a = archive_read_new ();
g_autoptr(GVariant) refs = g_variant_get_child_value (pull_data->summary, 0);
g_autoptr(GVariant) refdata = NULL;
g_autoptr(GVariant) reftargetdata = NULL;
- g_autoptr(GVariant) commit_data = NULL;
guint64 commit_size;
g_autoptr(GVariant) commit_csum_v = NULL;
- g_autoptr(GBytes) commit_bytes = NULL;
int i;
if (!ot_variant_bsearch_str (refs, ref, &i))
OstreeFetcher *fetcher = (OstreeFetcher *)object;
FetchStaticDeltaData *fetch_data = user_data;
OtPullData *pull_data = fetch_data->pull_data;
- g_autoptr(GVariant) metadata = NULL;
g_autofree char *temp_path = NULL;
g_autoptr(GInputStream) in = NULL;
g_autoptr(GVariant) part = NULL;
g_autofree char *delta_name =
_ostree_get_relative_static_delta_superblock_path (from_revision, to_revision);
g_autoptr(GBytes) delta_superblock_data = NULL;
- g_autoptr(GBytes) delta_meta_data = NULL;
- g_autoptr(GVariant) delta_superblock = NULL;
if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
pull_data->content_mirrorlist,
gboolean opt_gpg_verify_set = FALSE;
gboolean opt_gpg_verify_summary_set = FALSE;
const char *url_override = NULL;
- g_autofree char *base_meta_url = NULL;
- g_autofree char *base_content_url = NULL;
gboolean mirroring_into_archive;
gboolean inherit_transaction = FALSE;
int i;
{
g_autoptr(GBytes) bytes_sig = NULL;
- g_autofree char *ret_contents = NULL;
gsize i, n;
g_autoptr(GVariant) refs = NULL;
g_autoptr(GVariant) deltas = NULL;
GError **error)
{
gboolean ret = FALSE;
- g_autoptr(GHashTable) from_bsdiff = NULL;
- g_autoptr(GHashTable) to_bsdiff = NULL;
g_autoptr(GBytes) tmp_from = NULL;
g_autoptr(GBytes) tmp_to = NULL;
g_autoptr(GFileInfo) from_finfo = NULL;
GError **error)
{
gboolean ret = FALSE;
- g_autoptr(GHashTable) from_rollsum = NULL;
- g_autoptr(GHashTable) to_rollsum = NULL;
g_autoptr(GBytes) tmp_from = NULL;
g_autoptr(GBytes) tmp_to = NULL;
g_autoptr(GFileInfo) from_finfo = NULL;
g_autoptr(GVariant) to_commit = NULL;
g_autoptr(GHashTable) to_reachable_objects = NULL;
g_autoptr(GHashTable) from_reachable_objects = NULL;
- g_autoptr(GHashTable) from_regfile_content = NULL;
g_autoptr(GHashTable) new_reachable_metadata = NULL;
g_autoptr(GHashTable) new_reachable_regfile_content = NULL;
g_autoptr(GHashTable) new_reachable_symlink_content = NULL;
g_autoptr(GHashTable) modified_regfile_content = NULL;
g_autoptr(GHashTable) rollsum_optimized_content_objects = NULL;
g_autoptr(GHashTable) bsdiff_optimized_content_objects = NULL;
- g_autoptr(GHashTable) content_object_to_size = NULL;
if (from != NULL)
{
const char *opt_filename;
g_autofree char *descriptor_name = NULL;
glnx_fd_close int descriptor_dfd = -1;
- g_autoptr(GVariant) tmp_metadata = NULL;
g_autoptr(GVariant) fallback_headers = NULL;
g_autoptr(GVariant) detached = NULL;
gboolean inline_parts;
GBytes *payload_b;
GBytes *operations_b;
g_autofree guchar *part_checksum = NULL;
- g_autoptr(GChecksum) checksum = NULL;
g_autoptr(GBytes) objtype_checksum_array = NULL;
g_autoptr(GBytes) checksum_bytes = NULL;
g_autoptr(GOutputStream) part_temp_outstream = NULL;
char checksum[OSTREE_SHA256_STRING_LEN+1];
gboolean have_all;
g_autoptr(GInputStream) part_in = NULL;
- g_autoptr(GBytes) delta_data = NULL;
g_autoptr(GVariant) inline_part_data = NULL;
g_autoptr(GVariant) header = NULL;
g_autoptr(GVariant) csum_v = NULL;
g_autofree char *from = NULL;
g_autofree char *to = NULL;
g_autofree char *superblock_path = NULL;
- glnx_fd_close int superblock_fd = -1;
g_autoptr(GVariant) delta_superblock = NULL;
guint64 total_size = 0, total_usize = 0;
guint64 total_fallback_size = 0, total_fallback_usize = 0;
{
gboolean ret = FALSE;
guint8 *checksums_data;
- g_autoptr(GVariant) checksums = NULL;
g_autoptr(GVariant) mode_dict = NULL;
g_autoptr(GVariant) xattr_dict = NULL;
g_autoptr(GVariant) payload = NULL;
{
gboolean ret = FALSE;
guint64 offset, length;
- g_autoptr(GInputStream) in_stream = NULL;
g_autoptr(GMappedFile) input_mfile = NULL;
g_autofree guchar *buf = NULL;
struct bspatch_stream stream;
guint i;
g_autoptr(GPtrArray) delta_names = NULL;
g_auto(GVariantDict) deltas_builder = {{0,}};
- g_autoptr(GVariant) deltas = NULL;
if (!ostree_repo_list_static_delta_names (self, &delta_names, cancellable, error))
goto out;
{
g_autofree char *tmpdir_name_template = g_strconcat (tmpdir_prefix, "XXXXXX", NULL);
glnx_fd_close int new_tmpdir_fd = -1;
- g_autoptr(GError) local_error = NULL;
/* No existing tmpdir found, create a new */
const char *csum = ostree_deployment_get_csum (deployment);
g_autofree char *checkout_target_name = NULL;
g_autofree char *osdeploy_path = NULL;
- g_autoptr(GFile) ret_deploy_target_path = NULL;
glnx_fd_close int osdeploy_dfd = -1;
int ret_fd;
gboolean ret = FALSE;
int old_subbootversion, new_subbootversion;
glnx_fd_close int ostree_dfd = -1;
- glnx_fd_close int ostree_subbootdir_dfd = -1;
g_autofree char *ostree_bootdir_name = NULL;
g_autofree char *ostree_subbootdir_name = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
char *refs_to_fetch[] = { NULL, NULL };
const char *from_revision = NULL;
- g_autofree char *new_revision = NULL;
g_autofree char *origin_refspec = NULL;
if (self->override_csum != NULL)
glnx_fd_close int deployment_dfd = -1;
const char *deploy_basename;
g_autofree char *treebootserial_target = NULL;
- g_autofree char *deploy_dir = NULL;
GKeyFile *origin = NULL;
g_autofree char *unlocked_development_path = NULL;
struct stat stbuf;
GCancellable *cancellable,
GError **error)
{
- g_autoptr(GFile) pubring_file = NULL;
- g_autoptr(GOutputStream) target_stream = NULL;
- g_autofree char *pubring_path = NULL;
g_autofree char *tmp_home_dir = NULL;
gpgme_error_t gpg_error;
gboolean ret = FALSE;
glnx_unref_object OstreeSysroot *sysroot = NULL;
GKeyFile *origin = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
- g_autoptr(GPtrArray) new_deployments = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
g_autofree char *revision = NULL;
{ GKeyFile *old_origin = ostree_deployment_get_origin (target_deployment);
g_autofree char *origin_refspec = g_key_file_get_string (old_origin, "origin", "refspec", NULL);
- g_autofree char *new_refspec = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
{ g_autofree char *new_refspec = g_strconcat (remotename, ":", branch ? branch : origin_ref, NULL);
g_autoptr(GKeyFile) new_origin = NULL;
- g_autoptr(GFile) origin_path = NULL;
new_origin = ostree_sysroot_origin_new_from_refspec (sysroot, new_refspec);
g_autofree char *new_remote = NULL;
g_autofree char *new_ref = NULL;
g_autofree char *new_refspec = NULL;
- g_autofree char *new_revision = NULL;
- g_autoptr(GFile) deployment_path = NULL;
- g_autoptr(GFile) deployment_origin_path = NULL;
- glnx_unref_object OstreeDeployment *merge_deployment = NULL;
- glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
const char *deploy_index_str;
int deploy_index;
g_autoptr(GPtrArray) current_deployments = NULL;
- glnx_unref_object OstreeDeployment *booted_deployment = NULL;
glnx_unref_object OstreeDeployment *target_deployment = NULL;
context = g_option_context_new ("INDEX - Delete deployment INDEX");
gboolean ret = FALSE;
GOptionContext *context;
glnx_unref_object OstreeSysroot *sysroot = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
- g_autoptr(GPtrArray) new_deployments = NULL;
- glnx_unref_object OstreeDeployment *merge_deployment = NULL;
OstreeDeployment *booted_deployment = NULL;
OstreeDeploymentUnlockedState target_state;
GOptionContext *context;
glnx_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
- g_autoptr(GFile) deployment_path = NULL;
- g_autoptr(GFile) deployment_origin_path = NULL;
g_autoptr(GKeyFile) origin = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
{
gboolean ret = FALSE;
guint bootversion;
- g_autoptr(GFile) subpath = NULL;
- glnx_unref_object OstreeSePolicy *sepolicy = NULL;
- g_autoptr(GPtrArray) deployments = NULL;
GOptionContext *context = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
- g_autoptr(GFile) deployment_path = NULL;
context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
g_autofree char *src_repo_uri = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
g_autoptr(GPtrArray) refs_to_fetch = NULL;
- g_autoptr(GHashTable) source_objects = NULL;
OstreeRepoPullFlags pullflags = 0;
context = g_option_context_new ("SRC_REPO [REFS...] - Copy data from SRC_REPO");
gboolean ret = FALSE;
OstreeCommand *command = NULL;
const char *cmdname = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
int i;
gboolean want_help = FALSE;
const char *remote_name;
const char *remote_url;
char **iter;
- g_autofree char *target_name = NULL;
- g_autoptr(GFile) target_conf = NULL;
g_autoptr(GVariantBuilder) optbuilder = NULL;
gboolean ret = FALSE;
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
- g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *dirname = "foo";
const char *filename = "bar";
test_replace_file (void)
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
- glnx_unref_object OstreeMutableTree *parent = NULL;
- g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *filename = "bar";
const char *checksum = "01234567890123456789012345678901";